<?php

/**
 * Tag for setting url params for widgets like inlineEditBox
 * 
 * attributes:<br/>
 * htmltag: html tag to use for inlineEditBox e.g. span -> <span dojoType="inlineEditBox">MyText</span>. optional. default: span<br/>
 * onerror: name of a js function with signature function (type, error). If error == "noack", than the server action did not answer with "true"
 * 			as response value.
 */

m2import('phpinchains/psp/Tag.php');

class widget_paramHandler extends phpinchains_psp_Tag
{

    /**
     * Is a body tag (if false, body is ignored)
     */
    var $tagType = PSP_EMPTY_TAG;
    /**
     * Tag name in form namespace:tagname
     */
    var $tagName   = 'widget:param';
	var $htmltag;
	var $requiredAttributes = array(
		'name'=>'[\w\d_]+', 
		'value' => '.*'
	);
	var $attributes = array(
		'name',
		'value'
	);
	
    function doStartTag()
    {
    	$this->parent->url->addParam($this->attrs['name'], $this->attrs['value']);
    	return PSP_SKIP_BODY;
    }

}
?>